package com.yunchang.springboot.mapper.mwsreport;

import com.yunchang.springboot.models.mwsreportbean.MwsFbaCustomerReturns;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MwsFbaCustomerReturnsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MwsFbaCustomerReturns record);

    int insertSelective(MwsFbaCustomerReturns record);

    MwsFbaCustomerReturns selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MwsFbaCustomerReturns record);

    int updateByPrimaryKey(MwsFbaCustomerReturns record);

    String getLatestDay(@Param("sellerId") String sellerId, @Param("area") String area);

    /**
     * 根据creteTime获取对应的数据
     * @param time
     * @return
     */
    List<MwsFbaCustomerReturns> selectByCreateTime(String time);

    /**
     * 根据是否生成财务数据获取对应的数据，limitValue用于指定获取数据的数量
     * @param financeStatus
     * @param limitValue
     * @param date
     * @return
     */
    List<MwsFbaCustomerReturns> selectByFinanceStatus(@Param("financeStatus") Integer financeStatus,@Param("limitValue") Integer limitValue,@Param("date") String date);

    /**
     * 根据mwsFbaCustomerReturnsList集合更新financeStatus
     * @param mwsFbaCustomerReturnsList
     * @return
     */
    int updateFinanceStatusByMwsFbaCustomerReturnsList(@Param("mwsFbaCustomerReturnsList") List<MwsFbaCustomerReturns> mwsFbaCustomerReturnsList);
}